<?php
require 'Admin.class.php';
require 'AdminServices.class.php';
    $adminservice=new AdminService();
    $admin=new Admin();
    //接受数据 c
    $admin->id=$_POST['id'];
    $admin->password=$_POST['password'];
    $name=$adminservice->checkuser($admin);
    if($name!="")
    {
        header("Location:manageview.php?name=$name");
        exit();
    }
    else {
        header("Location:login.php?error=1");
        exit();
    }